package cn.wh.db.router.enums;

/**
 * @Author wh
 * @Description 读取 spring 路由属性配置 枚举
 * @Date 2023/3/28 15:11
 * @Version 1.0
 **/
public class RoutingConstans {

    /**
     * spring 配置后缀
     */
    public static final String PREFIX = "mini-db-router.jdbc.datasource.";


    /**
     * 分库数量
     */
    public static final String DBCOUNT = "dbCount";

    /**
     * 分表数量
     */
    public static final String TBCOUNT = "tbCount";

    /**
     * 路由策略
     */
    public static final String ROUTING_STRATEGY = "routingStrategy";


    /**
     * 路由字段
     */
    public static final String ROUTING_KEY = "routingKey";


    /**
     * 默认数据源
     */
    public static final String DEFAULT = "default";

    /**
     * 分库分表数据源
     */
    public static final String LIST = "list";

    public enum RoutingStrategy {
        DEFAULT("default");

        private String desc;

        RoutingStrategy(String desc) {
            this.desc = desc;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

    }


}
